import request from '@/utils/request'
// 查询流程实例 列表
export function listInstances(query) {
	return request({
		url: '/flow/instances/list',
		method: 'get',
		params: query
	})
}
// 查询流程实例 详细
export function getInstances(ID) {
	return request({
		url: '/flow/instances/' + ID,
		method: 'get'
	})
}
// 新增流程实例
export function addInstances({
	                             formValue,
	                             processDefinitionId,
	                             operation,
	                             json
                             }) {
	return request({
		url: '/flow/instances',
		method: 'post',
		data: {
			formValue,
			processDefinitionId,
			operation,
			json
		}
	})
}
// 修改流程实例
export function updateInstances({
	                                formValue,
	                                processDefinitionId,
	                                processInstancesId,
	                                operation,
	                                taskId
                                }) {
	return request({
		url: '/flow/instances',
		method: 'put',
		data: {
			formValue,
			processDefinitionId,
			processInstancesId,
			operation,
			taskId
		}
	})
}
// 删除流程实例
export function delInstances(ID) {
	return request({
		url: '/flow/instances/' + ID,
		method: 'delete'
	})
}
// 删除流程实例
export function getLog(ID) {
	return request({
		url: '/flow/instances/getLog/' + ID,
		method: 'get'
	})
}
